#pragma once

#include "ImageButton.h"
#include "page_layout.h"
#include <vector>

class func_btn
{
public:
	virtual void show_btn() = 0;
	virtual void hide_btn() = 0;
};

class func_image_btn : public CImageButton, 
	public func_btn
{
public:
	void set_triggers(const std::vector<trigger>& vTriggers){m_vTrigger=vTriggers;}
	void show_btn(){EnableWindow(TRUE);}
	void hide_btn(){EnableWindow(FALSE);}

protected:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	DECLARE_MESSAGE_MAP()

private:
    std::vector<trigger> m_vTrigger;
};

class func_text_btn : public CButton,
	public func_btn
{
public:
	void set_triggers(const std::vector<trigger>& vTriggers){m_vTrigger=vTriggers;}
	void set_text(con_str_ref text);
	void show_btn(){ShowWindow(SW_SHOW);}
	void hide_btn(){ShowWindow(SW_HIDE);}

protected:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	DECLARE_MESSAGE_MAP()

private:
    std::vector<trigger> m_vTrigger;
};